Feature: IRC Bridge
    Background:
        Given a connection to IRC
        And a websocket connection
        And that the messages cache is empty

    Scenario: join chat
        When we join "#chats"
        And we wait a bit
        Then the movienight websocket sends a message announcing that "test" has joined

    Scenario: send messages
        Given that we have joined "#chats"
        When we send an IRC message to "#chats" saying "hello world"
        Then the movienight websocket sends a message announcing a chat message saying "hello world"

    Scenario: leave chat
        Given that we have joined "#chats"
        When we disconnect from IRC
        Then the movienight websocket sends a message announcing that "test" has left

    Scenario: user list
        Given that we have joined "#chats"
        When we request a user list
        Then the following users should be listed:
          | test |

